var util = require("../util");

module.exports = function(i, o) {
    var t = null, e = require("../common/miniBehavior")(i) || {};
    util.ext(i.prototype, {
        initBehavior: function() {
            if (!this.hasInitBehavior && !t && void 0 !== o && o) {
                try {
                    this.getConfig("enableConsole") && "function" == typeof e.consoleBehavior && e.consoleBehavior.call(this);
                } catch (i) {
                    util.warn("[arms] error in initBehavior", i);
                }
                return t = this, this.hasInitBehavior = !0, this;
            }
        }
    });
};